import request from '@/utils/request'

// 查询接取数量列表
export function listReceived(query) {
  return request({
    url: '/business/received/list',
    method: 'get',
    params: query
  })
}

// 查询接取数量列表
export function selectUserRole(query) {
  return request({
    url: '/business/received/selectUserRole',
    method: 'get',
    params: query
  })
}

export function getTaskCompletionStatistics(query) {
  return request({
    url: '/business/taskerp/getTaskCompletionStatistics',
    method: 'get',
    params: query
  })
}

// 查询接取数量详细
export function getReceived(id) {
  return request({
    url: '/business/received/' + id,
    method: 'get'
  })
}

// 新增接取数量
export function addReceived(data) {
  return request({
    url: '/business/received',
    method: 'post',
    data: data
  })
}

// 修改接取数量
export function updateReceived(data) {
  return request({
    url: '/business/received',
    method: 'put',
    data: data
  })
}

// 删除接取数量
export function delReceived(id) {
  return request({
    url: '/business/received/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/received/export',
    method: 'post',
    data: data
  })
}
